'''
加载pdf文件
'''
from langchain_community.document_loaders import PyMuPDFLoader, TextLoader


def load_pdf_data(file_path):
    loader = PyMuPDFLoader(file_path)
    pages = loader.load_and_split()
    return pages


def load_pdf_data_from_file():
    file_path = '../../load_file/layout-parser-paper.pdf'
    data = load_pdf_data(file_path)
    print(data)
